import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsString, MinLength } from 'class-validator';

export class CreateUserDto {
  @ApiProperty({ description: '用户名' })
  @IsNotEmpty({ message: '用户名不能为空' })
  @IsString()
  user_name: string;

  @ApiProperty({ description: '密码', minLength: 6 })
  @IsNotEmpty()
  @MinLength(6)
  password: string;
}
